Skip to content

Instantly share code, notes, and snippets.

View tmikeschu's full-sized avatar

Mike Schutte tmikeschu

View GitHub Profile

Business Logic

All code examples are written in JavaScript based on this app. The location of the file is commented at the top. Feel free to explore this repo if you prefer to look at some actual code before getting into the concepts.

Configuring the Webhook

Once you have the get_balance and account_transfer competencies built and

Clinc Platform Intro Video

Components of a Conversation

Conversations. You have them every day. Whether written or verbal, the process is similar.

We say something to someone else, they interpret what we we mean, they respond accordingly, we interpret their response, respond to it, and so on.

Clinc Platform Intro Video

Components of a Conversation

Conversations. You have them every day. Whether written or verbal, the process is similar.

We say something to someone else, they interpret what we we mean, they respond accordingly, we interpret their response, respond to it, and so on.

  • "What is my checking account balance?" mapping to accounts_start

    • Answer: more data
  • What are the reserved keywords for slot values?

{
    "reservedWords": [
        "account_number",
        "account_type",

Personal Finance Management (PFM)

Context: once account number is provided, persist through all contexts unless user asks to change account

Competency: spending (informational)

Slots:

@tmikeschu
tmikeschu / luhn_2.rb
Created October 4, 2018 16:41
ruby luhn iteration 2
class Luhn
def self.valid?(raw)
new(raw).valid?
end
def valid?
valid_length? && only_digits? && valid_sum?
end
private
@tmikeschu
tmikeschu / luhn_1.rb
Last active October 4, 2018 16:41
ruby luhn iteration 1
class Luhn
class << self
VALIDATORS = %i(valid_length? only_digits? valid_sum?)
def valid?(raw)
VALIDATORS.all? { |predicate| send(predicate, raw.tr(" ", "")) }
end
private
// cat, spaceship, plum
// jump
// hash/object
describe("cat.jump", () => {
let spaceship
let cat
before(() => {
spaceship = createSpaceshipWithPlums()
cat = createCat({ spaceship })
require 'benchmark'
require 'json'
class Fib
def self.main
RubyVM::InstructionSequence.compile_option = {
tailcall_optimization: true,
trace_instruction: false
}
puts 'What number do you want to give Fib?'
@tmikeschu
tmikeschu / fibonacci_tail.js
Last active June 24, 2018 14:05
Give that recursive function everything it needs!
// feel free to paste this in your JS console!
const slowfib = x => {
if (x === 0) return null
if (x < 5) return [0,1,1,2][x -1]
return slowfib(x - 2) + slowfib(x - 1)
}
const F = () => false
const add = (x, y) => !y ? z => x + z : x + y