Giter Club home page Giter Club logo

codelikethis's People

Contributors

aakatz3 avatar alexch avatar cyrilbois avatar dangeranger avatar dirtybirdnj avatar djmorosini avatar rhrynyszyn avatar robinrainwalker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codelikethis's Issues

Small complaint about Cypress .contain() wording

http://codelikethis.com/lessons/javascript/cypress#anchor/multiple_matches

Contains a section talking about the .contains() operator for Cypress. The "result" column in the table there is correct, but I think the wording here.

.contains( checks each individual element and succeeds if any contain the text

is confusing .contains() is not an assertion, it's actually a sub-selector based on text. You can use it as a puesdo-assertion from the standpoint that cypress will flip out if it can't find an element, but generally you would never end a call chain with .contains() because you should be using it to skinny down the collection of dom elements. I think the text should mention something about the behavior of the subject that the .contains() call returns. I think it returns a cypress style collection of elements each of which matched the .contains() predicate, but I'd have to go check to make sure.

Maybe something like this.
.contains( checks each individual element and returns the (first?) element if any contain the text

Create slides to explain mobile device performance

We should explain how and why mobile performance is important and how the size of the files included in a web page make a difference in the loading times and user experience.

Include information about:

  • Package sizes impact on load times
  • Image size / quality and compression
  • Webfonts and included font sizes
  • HTML/ CSS/ JS file compression
  • Uglification
  • Caching
  • Content Delivery Networks
  • Blocking vs. Parallel requests
  • Asynchronous package downloading
  • Using the browser 2G/3G/LTE network speed simulator

Look at the documentation at the Lighthouse Project for inspiration:

Create Bootstrap Template HTML file

Create a repo and file for using Bootstrap libraries for HTML/CSS layout so that students can simply:
git clone git@some_bootstrap_template_repo

Create the file within the BurlingtonCodeAcademy Github org.

Running single test/spec fails with "uninitialized constant Wrong::Date"

Description

When attempting to run single tests/specs from the command line or an IDE testing harness the spec fails due to NameError related to Wrong::Date

An error occurred while loading ./spec/thing_spec.rb.
Failure/Error: require "wrong"

NameError:
  uninitialized constant Wrong::Date
  Did you mean?  Data

However running all the specs with:

bundle exec rspec

Succeeds and runs the specs without a NameError occurring.

Affected Spec Files

  1. lesson_spec.rb
  2. link_spec.rb
  3. thing_spec.rb
  4. track_spec.rb

Unaffected Spec Files

  1. app_helpers_spec.rb

The app_helpers_spec.rb includes the lines:

require 'date'
require "wrong"

Errors after Require Date

However adding those lines above to the spec files with the issue allows the spec to run, but causes different errors including:

# From lesson_spec.rb

An error occurred while loading ./spec/lesson_spec.rb.
Failure/Error: args + {track: object}

NoMethodError:
  undefined method `+' for {:name=>"credits"}:Hash
# From link_spec.rb

An error occurred while loading ./spec/link_spec.rb.
Failure/Error:
    class View < Erector::Widget
      needs :target
  
      # proxy readers to the target (model) object
      [
          :display_name, :href, :description
      ].each do |method|
        define_method method do
          @target.send method
        end

NameError:
  uninitialized constant Link::Erector
# ./lib/link.rb:25:in `<class:Link>'
# From thing_spec.rb

An error occurred while loading ./spec/thing_spec.rb.
Failure/Error:
    class View < Erector::Widget
      needs :target
  
      # proxy readers to the target (model) object
      [
          :display_name, :href, :description
      ].each do |method|
        define_method method do
          @target.send method
        end

NameError:
  uninitialized constant Link::Erector
# From track_spec.rb

  1) Track takes a list of lesson names
     Failure/Error: args + {track: object}
     
     NoMethodError:
       undefined method `+' for {:name=>"foo"}:Hash

Reproduction Steps

Single Spec File

~/Dev/burlington-code-academy/codelikethis
-> % bundle exec rspec --format documentation spec/thing_spec.rb
n
An error occurred while loading ./spec/thing_spec.rb.
Failure/Error: require "wrong"

NameError:
  uninitialized constant Wrong::Date
  Did you mean?  Data
# ./spec/thing_spec.rb:1:in `require'
# ./spec/thing_spec.rb:1:in `<top (required)>'
No examples found.

Finished in 0.00028 seconds (files took 0.3491 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

Single Spec Line

~/Dev/burlington-code-academy/codelikethis
-> % bundle exec rspec --format documentation spec/thing_spec.rb:30


An error occurred while loading ./spec/thing_spec.rb.
Failure/Error: require "wrong"

NameError:
  uninitialized constant Wrong::Date
  Did you mean?  Data
# ./spec/thing_spec.rb:1:in `require'
# ./spec/thing_spec.rb:1:in `<top (required)>'
Run options: include {:locations=>{"./spec/thing_spec.rb"=>[30]}}

All examples were filtered out

Finished in 0.0003 seconds (files took 0.36338 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

Need Chrome Inspector Lab/Demo

Curriculum needs a lab or demo showing how to use the Chrome / Firefox browser inspector for investigating the state of the DOM and the propagated CSS applied to the DOM.

bundle install on MacOS El Capitan fails due to Event Machine OpenSSL lib

Problem

On MacOS El Capitan 10.11.+ and above running bundle install will fail due to Apple replacing OpenSSL due to security CVE's.

NOTE: This might have something to do with the Ruby version being pegged to 2.2.4.

Explanation and example on StackOverflow

Proposed Solution

Change the README to notify users to follow the instructions below to allow EventMachine gem to build using a third party OpenSSL library installed using HomeBrew or other dependency manager.

Instructions

  1. Install HomeBrew
  2. Install OpenSSL
    brew install openssl
  3. Install the EventMachine gem v1.0.8 separately with compile flags
$ gem install eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include                                                                                                              
Building native extensions with: '--with-cppflags=-I/usr/local/opt/openssl/include'
This could take a while...
Successfully installed eventmachine-1.0.8 1 gem installed
  1. Alternatively configure bundler to use Brew OpenSSL
bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include
bundle install

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.