Skip to content

Instantly share code, notes, and snippets.

@nathantross
nathantross / intro_to_ux.md
Last active August 2, 2023 16:46
Intro to UX

#Intro to UX for your App

###What is UX?

For this project, think of UX as how a person interacts with you app, and how they experience the touch-points across your entire application.

###Why should you care about UX?

Industry Reason:

  • User Acquisition
@nathantross
nathantross / gist:8588957
Last active January 4, 2016 07:29
Notes from Rails Review - Jan 23
# app/controllers/site_controller.rb
class SiteController < ApplicationController
def index
end
def contact
end

Rails View

  • Understand steps to set up rails app.

    *

    Start Sublime

    *

    Edit Gemfile - 'pry'

    *

    Bundle Install

    *

    Edit .gitignore file

    *

    Add Bootstrap

  • Understand steps to get rails app running.

    *

    Setup first route

    * Setup first Controller

Rails View

  • Understand steps to set up rails app.

    *

    Start Sublime

    *

    Edit Gemfile - 'pry'

    *

    Bundle Install

    *

    Edit .gitignore file

    *

    Add Bootstrap

  • Understand steps to get rails app running.

    *

    Setup first route

    * Setup first Controller

#Debugging & Testing

Find the errors in the following

1.)*

My script is loading fine, but separate style sheets aren't working

Bootstrap so far

Go to http://getbootstrap.com and download the dist folder.

  • Navigate to the dist/css/bootstrap.min.css file.
  • Copy and paste it into your app folder under /public/stylesheets/bootstrap.min.css.

Let's create our own responsive grid example. Go to the index

More Sinatra

Views

Right now, we are serving a "Hello, World!" string to the client. However, this is the web and content sent to clients is usually HTML. Lets create a folder for these HTML files called views.

Let's create an index.html file as follows.

./views/index.html

require 'sinatra'
require 'sinatra/reloader'
get "/:operator/*" do
operator = params[:operator].to_s
n = params[:splat][0].split('/')
n.map!{ |e| e.to_f }
case operator
when "add"

Object Oriented Design & Programming - exercise

###Quick review:

  • What's an object, what's a class?

Classes are a little bit like templates. Usually, you create an instance of a class - an object. Object methods get the job done, for example blend a smoothie.

Sometimes classes have methods too, that means classes can do things without the need to create an object. But for sake of simplicity, let's say we always want to create an instance of a class, an object.

RSpec Testing

##BDD - Behavior Driven Development #Learing Objectives:

  • Understand BDD development flow

  • Install and configure RSpec

  • Understand basic RSpec blocks: describe, context, it

  • Understand how to write RSpec tests

  • Understand how to run RSpec tests

  • Understand how to make list of attributes and behaviors