Giter Club home page Giter Club logo

chitter-challenge's Introduction

Chitter Challenge

  • Feel free to use Google, your notes, books, etc. but work on your own
  • If you refer to the solution of another coach or student, please put a link to that in your README
  • If you have a partial solution, still check in a partial solution
  • You must submit a pull request to this repo with your code by 10am Monday morning

Challenge:

As usual please start by forking this repo.

We are going to write a small Twitter clone that will allow the users to post messages to a public stream.

Features:

STRAIGHT UP

As a Maker
So that I can let people know what I am doing  
I want to post a message (peep) to chitter

As a maker
So that I can see what others are saying  
I want to see all peeps in reverse chronological order

As a Maker
So that I can better appreciate the context of a peep
I want to see the time at which it was made

As a Maker
So that I can post messages on Chitter as me
I want to sign up for Chitter

HARDER

As a Maker
So that only I can post messages on Chitter as me
I want to log in to Chitter

As a Maker
So that I can avoid others posting messages on Chitter as me
I want to log out of Chitter

ADVANCED

As a Maker
So that I can stay constantly tapped in to the shouty box of Chitter
I want to receive an email if I am tagged in a Peep

Technical Approach:

In the last two weeks, you integrated a database using the pg gem and Repository classes. You also implemented small web applications using Sinatra, RSpec, HTML and ERB views to make dynamic webpages. You can continue to use this approach when building Chitter Challenge.

You can refer to the guidance on Modelling and Planning a web application, to help you in planning the different web pages you will need to implement this challenge. If you'd like to deploy your app to Heroku so other people can use it, you can follow this guidance.

If you'd like more technical challenge now, try using an Object Relational Mapper as the database interface, instead of implementing your own Repository classes.

Some useful resources: Ruby Object Mapper

ActiveRecord

Notes on functionality:

  • You don't have to be logged in to see the peeps.
  • Makers sign up to chitter with their email, password, name and a username (e.g. [email protected], password123, Sam Morgan, sjmog).
  • The username and email are unique.
  • Peeps (posts to chitter) have the name of the maker and their user handle.
  • Your README should indicate the technologies used, and give instructions on how to install and run the tests.

Bonus:

If you have time you can implement the following:

  • In order to start a conversation as a maker I want to reply to a peep from another maker.

And/Or:

  • Work on the CSS to make it look good.

Good luck and let the chitter begin!

Code Review

In code review we'll be hoping to see:

  • All tests passing
  • High Test coverage (>95% is good)
  • The code is elegant: every class has a clear responsibility, methods are short etc.

Reviewers will potentially be using this code review rubric. Referring to this rubric in advance may make the challenge somewhat easier. You should be the judge of how much challenge you want at this moment.

Notes on test coverage

Please ensure you have the following AT THE TOP of your spec_helper.rb in order to have test coverage stats generated on your pull request:

require 'simplecov'
require 'simplecov-console'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
  SimpleCov::Formatter::Console,
  # Want a nice code coverage website? Uncomment this next line!
  # SimpleCov::Formatter::HTMLFormatter
])
SimpleCov.start

You can see your test coverage when you run your tests. If you want this in a graphical form, uncomment the HTMLFormatter line and see what happens!

chitter-challenge's People

Contributors

anitacanita avatar chrisjbatts avatar david-mears avatar dearshrewdwit avatar domvernon avatar edwardandress avatar jamesjoshuahill avatar leoht avatar neoeno avatar ptolemybarnes avatar samjones1001 avatar sdorunga avatar silvabox avatar sjmog avatar soph-g avatar spike01 avatar tansaku avatar tatsiana-makers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chitter-challenge's Issues

Cannot retrieve text from Peep object

I have a maddening issue. It's got to be something simple but I can't understand what it is. Would really appreciate any help / thoughts!

I've got my user signup, sign-in and sign-out working fine, and now I'm working on this user story:

As a Maker
So that I can let people know what I am doing
I want to post a message (peep) to chitter

I'm successfully saving my Peeps to the database. I know this because I've looked in my chitter_development 'peeps' table using psql.

I'm then retrieving them in my controller using:

get '/' do
@Peeps = Peep.all
erb :'index'
end

In the index.erb file, if I put @Peeps.first.class, it tells me it's a "Peep" object, and then if I put in @Peeps.first.methods, it tells me that "peep_text" is available to me (that's the column that has the text in it). BUT when I put in @Peeps.first.peep_text, I get the error, "undefined method `peep_text' for nil:NilClass"

It's not nil. It's a Peep object! Why is this happening? Is it some kind of permissions error? I've tried to google but I can't find the answer. Perhaps I am just too tired.

Please feel free to take a look at my code at: https://github.com/francesmx/chitter-challenge

Super grateful for any ideas.
Frances

UPDATE: I've just discovered that peep_text WORKS on development, i.e. when I check in the browser, but it does NOT in test. However all the other info about the Peep object etc I got from running RSpec so it's not an issue with the structure of the test database or anything, and it's still retrieving a Peep object. It's nuts!

P.S. Obviously later on I'll iterate over @Peeps instead of using .first but for now I know the count is 1 and it's the simplest way to pass the test (for now - or so I thought!)

travis build makersacademy problem.

In my computer, all works perfecty.
the coveralls report, passes.
the rspec.. passes.
in heroku.. all good.. but the pull request.. does not pass and this is the error.. any idea?

/home/travis/build/makersacademy/chitter-challenge/vendor/bundle/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:63:in `execute_non_query': ERROR: syntax error at or near "IDENTITY" (DataObjects::SyntaxError)
LINE 1: TRUNCATE TABLE RESTART IDENTITY;
^

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.