Skip to content

Instantly share code, notes, and snippets.

View dschinkel's full-sized avatar
💻

Dave Schinkel dschinkel

💻
View GitHub Profile
@dschinkel
dschinkel / EmailSweeper.java
Last active March 27, 2019 22:26
Pillar Bootcamp
package subscriptions;
import dependencies.User;
import dependencies.UserMailer;
import dependencies.UserRepository;
public class EmailSweeper {
UserMailer mailer;
UserRepository repository;
String unpaidMessage = "Please renew your subscription to Ferret Fancy!";
@slagyr
slagyr / autumn.js
Last active January 9, 2019 23:44
Autumn code
/**
* Micah's Autumn setup
*/
alert('Running Autumn!');
/**
* Window management
*/
@dschinkel
dschinkel / no-ddd.md
Last active January 4, 2019 06:01
There is no such thing as "Document Driven Development"

My repsonse to zsup/ddd.md in which he wrote:

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified
@dschinkel
dschinkel / oh-my-zsh.commands.csv
Last active November 27, 2018 02:01
my favorite oh-my-zsh commands
alias for git command
ga . git add .
gcmsg git commit -m
gp git push
gp -f git push -f
gst git status
gb git branch
gb git branch
gco git checkout
gco -b git checkout -b
@dschinkel
dschinkel / PlayingWithElmDictionaries.elm
Last active September 20, 2018 05:27
Elm - Dictionaries
-- instead of using a 2D list or 2D array to represent a game node/board, lets use a Dict instead
-- with Dict unlike List or Array, it's much easier to insert, find, and update values
{--
repl:
make sure you have no trailing spaces after \. Also, might need to uses spaces not tab in Sublime text
import Dict
board = Dict.fromList \
[ \
{--
Below shows some code commands that if entered into elm repl shows the output received
--}
import List
empty = ' '
markerX = 'X'
markerO = 'O'
gameNode = [ [ markerX, empty, empty ], [ markerO, markerO, empty ], [ markerX, empty, empty ]]
@skfarhat
skfarhat / build.gradle
Created June 26, 2018 19:01
Sample build.gradle used in a Cucumber based test project
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
plugins {
id "com.github.samueltbrown.cucumber" version "0.9"
}
@tonybaines
tonybaines / IntelliJ-Elm-Setup.md
Last active January 5, 2019 19:41
IntelliJ IDEA Elm Setup

Configuring and Using IntelliJ IDEA for basic Elm development

Assumes an elm toolchain installed through NPM

npm install -g elm elm-test elm-format

Versions

  • Elm 0.18
  • IntelliJ IDEA 2017.3.4
@sgdan
sgdan / KeepInList.elm
Created November 5, 2017 12:36
Iterate through an Elm list and compare each element against all the others
{--
Iterate through a list and compare each element to all the others to decide what to keep
Run at http://elm-lang.org:1234/try
--}
import Html exposing (text, div, br)
import String exposing (..)
initial = ["a", "ab", "c", "cdb", "cd"]
@sgdan
sgdan / DictIterators.elm
Created October 29, 2017 04:23
Iterating over a map in Elm
{--
Some Elm code for various ways to iterate over a map
Run at http://elm-lang.org:1234/try
--}
import Html exposing (text, div, br)
import Dict exposing (Dict)
import String exposing (toUpper)