Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ess on github.
  • I am dwalters (https://keybase.io/dwalters) on keybase.
  • I have a public key whose fingerprint is 4BBB EF9A 37EE E661 6E50 5C97 5150 0C5A 7157 EE4E

To claim this, I am signing this object:

We use a Fibonacci point scale that works like this:

  • 0 Points - Nothing task, five minutes or so.
  • 1 Point - No more than 1 effort hour
  • 2 Points - No more than 4 effort hours
  • 3 Points - No more than 8 effort hours
  • 5 Points - No more than 16 effort hours
  • 8 Points - The story/task is too large and should be broken up into measurable tasks.

This is a very quick-and-dirty cheatsheet for descrbing features in Gherkin. Through this, we'll use the example of describing a user signing into an application.

Basics

Starting A Story

The first thing to do when writing a story for a feature is to give the story a title and a synopsis. These are effectively free-form text with the exception that the title should start with "Feature: " and the synopsis should be indented one level:

Feature: User Signs In
@ess
ess / hw22-3
Last active December 11, 2017 23:48 — forked from wisetara/hw22-3
Bash script
# Write a bash script named "hw22-3" that accepts a list of inode numbers from the command line,
# and displays
# the file name and physical file system of each file with that inode number. If no
# file exists with that inode number display "no such file".
#
# EXAMPLE:
# > hw22-3 8384567 12345
# Inode "8384567" has files:
# main.cpp on /dev/mapper/system-student
#

One day, I'll make the perfect web app language.

  • whitespace will be significant, and leading whitespace must be an alternating series of tabs and spaces: \t \t \t
  • it won't support promises, but it will support wild speculation
  • the documentation will simply be a link to StackOverflow
  • exactly 30% of the standard library will be API stable (but only on Tuesdays with an odd-numbered day)
def write_pid
if path = options[:pidfile]
pidfile = File.expand_path(path)
`logger -t sidekiq-runner "Writing #{::Process.pid} to #{pidfile}"`
File.open(pidfile, 'w') do |f|
f.puts ::Process.pid
end
sleep 1
unless File.exist?(pidfile)
@ess
ess / version1.rb
Last active October 18, 2015 04:34
Given the following options, which would be your preference for defining the code that is run as the default hook?
class Something < Base
title "something"
def handle
# custom code that runs when an instance is used as a handler
end
end
@ess
ess / gliip.rb
Created October 13, 2015 22:53
Trying to make a GLI app work as an in-process Aruba app
#!/usr/bin/env ruby
require 'gli'
module FooCommand
def bootstrap_foo
desc 'Say sup to some foo'
arg 'foo arg'
command :foo do |c|
c.action do |global_options, options, args|
#!/usr/bin/perl
use Cwd;
use File::Path;
my $tree = $ARGV[0];
sub saw ($) {
my($leaf) = @_;
my $cwd = getcwd;
# For those times when I don't want to keep track of what arguments are being
# given to Wisper::Publisher#publish ... the Wisper rspec matchers seem like
# much overkill
class MagicListener
def method_missing(method_sym, *arguments, &block)
[method_sym] + arguments
end
def respond_to?(method_sym, include_private = false)