Giter Site home page Giter Site logo

curriculum's Issues

Blogger screen.css inaccessible from current link

The screen.css link in the Blogger project is not accessible:

Styling

This is not a CSS project, so to make it a bit more fun we’ve prepared a CSS file you can drop in. It should match up with all the example HTML in the tutorial.

Download the file from http://tutorials.jumpstartlab.com/assets/blogger/screen.css and place it in your app/assets/stylesheets/ folder. It will be automatically picked up by your project.

The link http://tutorials.jumpstartlab.com/assets/jsblogger/screen.css fetches the appropriate css. Perhaps this file wasn't migrated when the project was renamed from jsblogger? The file does exist on the master branch at public/assets/blogger/screen.css.

Haml: Filters

Talk about markdown filters and such in the haml lesson

Event Manager - CSV.open method call

I am a complete noobie to Ruby (and GitHub for that matter). So if this comment is of no value, or if this issue is solely the result of my ignorance, please forgive me.

I just began working through Event Manager tutorial, and am at the "Iteration: 0" section. I found that running the following code:

# Dependencies
require "csv"

# Class Definition
class EventManager
    def initialize
        puts "EventManager Initialized."
        filename = "event_attendees.csv"
        @file = CSV.open(filename)
    end
end

# Script
manager = EventManager.new

Gives me the following error:

 /home/justin/Documents/Code/event_manager/event_manager.rb:9:in `open': wrong number of arguments (1 for 2) (ArgumentError)
     from /home/justin/Documents/Code/event_manager/event_manager.rb:9:in `initialize'
     from /home/justin/Documents/Code/event_manager/event_manager.rb:14:in `new'
     from /home/justin/Documents/Code/event_manager/event_manager.rb:14
 EventManager Initialized.
 [Finished]

But when I add the optional argument mode = 'rb' to CSV.open(filename) like this:

# Dependencies
require "csv"

# Class Definition
class EventManager
    def initialize
        puts "EventManager Initialized."
        filename = "event_attendees.csv"
        @file = CSV.open(filename, mode = 'rb')
    end
end

# Script
manager = EventManager.new

Then I get no errors:

 EventManager Initialized.
 [Finished]

I had to stare for awhile at the CSV.open method specification and tried the mode argument on a whim (I have the vague sense it has something to do with encoding). Would it be useful to include mode = 'rb' in the example code?

Best,
jb

ps - is this an overkill description?

CSS is off in application.html.haml [was: JSBlogger notes from Jim]

@jimweirich is working with JSBlogger this week and had these revision suggestions:

  • Migration methods are now up/down, not self.up/self.down
  • Routing table shown using older format
  • No need for h() method anymore (in general)
  • @article.comments.new attaches the new comment to the in-memory version of the article, goofing up the display. I changed it to Comment.new(:article_id => @article.id)
  • In the tagging section, @ruby, technology@ didn't render correctly (actually, there were a lot of mis-renders involving markdown)
  • Because the TagsController was generated with method names, the error is missing template, not undefined action.
  • Paperclip migration: change AND self.down?, should be change or up/down, (2) and drop the self.
  • Sass information is out of date: (1) don't need to install, comes with rails, (2) don't put in public/stylesheet/styles.sass, put in app/assets/stylesheets/styles.css.sass, (3) sass example uses deprecated syntax (e.g. ! and = for variables)
  • application.html.haml seems a bit off, doesn't work well with the provided CSS; particularly the #container/#content stuff.
  • Comment: Seems strange that our first introduction to validations is the password confirmation. (see email from Jeff)
  • When adding an admin user, the url should be /bloggers/new, not /users/new
  • Typo: BloggerSessios => BloggerSessions
  • Blogger.all.size should be Blogger.count

SASS -> SCSS

Most people use SCSS because it's also valid CSS3... @jcasimir unless you have serious objections, I think we should switch over.

Turn a String into a Ruby Date

The code in the third bullet under "Step 2: Requirements Always Change" reads
date = Date.strptime("11/12/08", "%m/%d/%Y")
I believe it should read
date=Date.striptime("11/28/08","%m/%d/%y")
Without the correct year, the day of the week will also not be correct.
Cheers

Typo: "and that a recipe"

"These changes will mean changing the same code in two places, and that a recipe for regression bugs."

Should read: "... and that's a recipe..."

stuff that can be removed or generalized

I'm working on generalizing the curriculum for ongoing use. What are good candidates for removal?

  • refs to http://jumpstartlab.com/chat
  • refs to individual participants, such as "Steve will give lightening talk next week"
  • refs to milestone dates, such as "Homework for 2/10" or "March 12: Object design, source control, reading group"

Others...?

Rails 3.2.2 and attr_accessible

The awesome changes to 3.2.2 and the requirement of an attr_accessible necessitates revisions to all the Rails tutorials and sample code.

Notes from a user about JSBlogger:

Hi,

I'm working on the JsBlogger tutorial and I'm coming into a problem. I just finished the section on displaying tags but when I try to create a new article with new tags it says: "Can't mass-assign protected attributes: tag" and it says its the result of this code:

class Article < ActiveRecord::Base
attr_accessible :title, :body, :tag_list
has_many :comments
has_many :taggings
has_many :tags, :through => :taggings

def tag_list
return self.tags.join(", ")
end

def tag_list=(tags_string)
tag_names = tags_string.split(",").collect{|s| s.strip}
tag_names.each do |tag_name|
tag = Tag.find_or_create_by_name(tag_name)
self.taggings.build(:tag => tag)
end
end
end

I added the :tag_list to attr_accessible because it was saying it couldn't mass assign that as well. If you need any more information, let me know.

spelling error

"We’ve come full circle: now it’s ignorant of the background work and caching going on behind the seens. "

Should be 'scenes'

JSattend confusing pseudocode

Iteration 3: Outputting Cleaned Data, Step 1:
I'm really confused by the pseudocode in the comment:

def output_data
 output = CSV.open("event_attendees_clean.csv", "w")
 @file.each do |line|
   # if this is the first line
   #   output the headers
   output << line
 end
end

I think it's not worth it checking in each iteration if that's the first line over and over again.
The easiest way to add the header is to configure that in the option hash:

@file = CSV.open(filename, {:headers => true, :return_headers => true, :header_converters => :symbol})

Should I rework that in form of a Pull Request?
Greetings!

Blogger - error in Iteration 0?

Hello, I started working though the Blogger tutorial and have stumbled a bit in the Creating the Template portion of Iteration 0. Essentially, when I create index.html.erb in app/views/articles with the example code:

<h1>All Articles</h1>

<ul>
  <% @articles.each do |article| %>
    <li>
      <%= article.title %>
    </li>
  <% end %>
</ul>

I get the following error in my browser:

ExecJS::RuntimeError in Articles#index

Showing C:/Users/General/My Documents/Code/blogger/app/views/layouts/application.html.erb where line #6 raised:


  (in C:/Users/General/My Documents/Code/blogger/app/assets/javascripts/articles.js.coffee)
Extracted source (around line #6):

3: <head>
4:   <title>Blogger</title>
5:   <%= stylesheet_link_tag    "application", :media => "all" %>
6:   <%= javascript_include_tag "application" %>
7:   <%= csrf_meta_tags %>
8: </head>
9: <body>
Rails.root: C:/Users/General/My Documents/Code/blogger

Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__710993880_42455376'
Request

Parameters:

None
Show session dump

Show env dump

Response

Headers:

None

Everything has gone smoothly up until this point. Hopefully I'm not overlooking something?

Best,
Justin

EventManager line 283

The code example, which we are instructed to paste into our existing code, uses a variable "number" which had not been initialized at that point in the tutorial.

JSBlogger Instructions

Write a short couple paragraphs about setting up JSBlogger

  • Checkout from github
  • Create a branch
  • Start server
  • Start console
  • Have command prompt in project directory available
  • Instructions for going back for a new example (git checkout master, git checkout -b new_branch)

Proof it, try it, then replace all the tag markers in the source text with a link to the instructions.

Store the whole thing under /topics

jQuery Tutorials

The jQuery tutorials just got dumped in the SOURCE directory in their original textile. They need markup revision to markdown and a ton of technical/English editing.

use of redirect_to

After Creation

I was unable to use the path given: redirect_to article_path(@comment.article).

Routing Error

No route matches {:action=>"show", :controller=>"articles"}

I was able to successfully complete this step using:

redirect_to articles_path(@comment.article) instead.

RubyMine -> SublimeText

We should really just kill the RubyMine references, ST is basically better to introduce people to, and what we've been doing for a while.

Sass deprecation issues

When deploying, I get this:

 DEPRECATION WARNING on line 107 of /tmp/build_st1qztm6vxt4/sass/base/_layout.scss:
       Using @extend within directives (e.g. @media) is deprecated.
       It will be an error in Sass 3.2.
       This will only work once @extend is supported natively in the browser.

Also on lines

 DEPRECATION WARNING on line 124 of /tmp/build_st1qztm6vxt4/sass/base/_layout.scss:
       DEPRECATION WARNING on line 155 of /tmp/build_st1qztm6vxt4/sass/base/_layout.scss:
       DEPRECATION WARNING on line 57 of /tmp/build_st1qztm6vxt4/sass/partials/_navigation.scss:

Screen Styles

If you have a UL inside a UL, then the interior UL get's a large bottom margin. For example, search for "Do they map convenience" on: /routes/router.html

Event Manager - Form Letter Error

So I made it through the Event Manager tutorial. It was awesome. Thank you so much for sharing.

I only came across one other minor error: In Iteration 5, Step 1, there is some example code for using the gsub method:

custom_letter = letter.gsub("#first_name","#{line[:first_name]}")
custom_letter = custom_letter.gsub("#last_name", "#{line[:first_name]}")

But I believe on the second line :first_name should actually be :last_name

That's all I found! Thanks again!

~justin

Option to hide feedback tab

The feedback tab, while useful, distracts me from reading especially on my iPhone. It also blocks the words a little bit. Create an option to hide the feedback bar or move it to the bottom of the page.

Use of html_safe

In the tutorial there is a section creating a tag helper.

def tag_links(tags)
links = tags.collect{|tag| link_to tag.name, tag_path(tag)}
return links.join(", ")
end

Since I'm new I didn't understand why my html was being escaped in the view. I needed to use .html_safe. I'm not entirely sure why, but it seems to work. Maybe a note should be added about this?

def tag_links(tags)
links = tags.collect{|tag| link_to tag.name, tag_path(tag)}
return links.join(", ").html_safe
end

tag_list need updated

In the Tagging > An Interface for Tagging section the code for tag_list return object references instead of strings. When you edit an article it lists the object id's in the tags field.

def tag_list
    return self.tags.join(", ")
 end

This is probably not the best way to do this, but I ended up with:

def tag_list
    #return self.tags.join(", ")
    new_tags = []
        self.tags.each do |tag|
            new_tags << tag.name
        end
    return new_tags.join(", ")
 end

JSAttend Typo

Then, try calling inspect on the line object again:

def print_names
@file.each do |line|
puts inspect
#puts line[2] + " " + line[3]
end
end

Should the "puts inspect" be "puts line.inspect"?

debugger

add a note about finish returning to the caller frame

Formatting of .opinion and .note blocks

Currently the source text has .note and .opinion DIVs. The markdown engine is not processing the text inside the DIV, meaning it gets no P tags and no italics, PRE, etc.

outdated user note

On the SalesEngine page:

"As this project is very complex, consider the requirements fluid until 11:59PM, Monday, March 26th."

Is this project now considered specced out enough to remove this user note? If not, what's a reasonable date to replace it?

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.