Skip to content

Instantly share code, notes, and snippets.

View dschinkel's full-sized avatar
💻

Dave Schinkel dschinkel

💻
View GitHub Profile
@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 / 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
@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
@slagyr
slagyr / autumn.js
Last active January 9, 2019 23:44
Autumn code
/**
* Micah's Autumn setup
*/
alert('Running Autumn!');
/**
* Window management
*/
@slagyr
slagyr / gist:42c06f51d9faafe2fc58
Last active January 9, 2019 23:44
asyn exceptions
(ns slagyr.async)
(den foo []
(js/setTimeout
(fn [] (throw (js/Error. "foo")))
100))
(try
(foo)
(catch js/Object e
@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!";
import android.content.res.Resources;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
/**
* Created by bapspatil
*/
@jschomay
jschomay / NestedList.elm
Created March 21, 2017 03:38
Nested List example in Elm
import Html exposing (text)
import List
{- Challenge: flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].
(This is a little tricky in Elm because the type system does not allow for lists with different element types. So we have to make a whole new data structure...)
-}
@markerikson
markerikson / dispatching-action-creators.js
Last active May 2, 2020 14:27
Dispatching action creators comparison
// approach 1: define action object in the component
this.props.dispatch({
type : "EDIT_ITEM_ATTRIBUTES",
payload : {
item : {itemID, itemType},
newAttributes : newValue,
}
});
// approach 2: use an action creator function
@ericelliott
ericelliott / args.js
Created June 24, 2011 08:05
Polymorphic functions and multiple dispatch in JavaScript
var args = [].slice.call(arguments, 0);