This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kata.skunkworks | |
data class SkunkWork(val title: String) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.xml.internal.xsom.impl.scd.Iterators; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
public class RomanNumeralCalculator { | |
ArrayList<String> numeralOrder = new ArrayList<String>() {{ | |
add("I"); | |
add("V"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.jr.ob.JSON; | |
import java.util.Map; | |
import static spark.Spark.get; | |
import static spark.Spark.port; | |
public class FakeNumberServer { | |
public static void main(String[] args) { | |
port(2000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MUTABLE MAPS | |
------------ | |
Note: Its type is inferred by underlying values within | |
*/ | |
val toRoman = mutableMapOf( | |
"IIIII" to "V", | |
"VV" to "X" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Note: | |
Uses superagent and mocha assertions. | |
This is how I do these tests nowdays, without supertest, just plain superagent. | |
*/ | |
import request from 'superagent' | |
it('returns a list of participants', async () => { | |
const url = 'https://someurl'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package roman.numeral.calculator.kotlin | |
class Calculator { | |
private val toRoman = mapOf( | |
"IIIII" to "V", | |
"VV" to "X", | |
"XXXXX" to "L", | |
"LL" to "C", | |
"CCCCC" to "D", | |
"DD" to "M" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package roman.numeral.calculator.kotlin | |
class Calculator { | |
private val toRoman = mapOf( | |
"IIIII" to "V", | |
"VV" to "X", | |
"XXXXX" to "L", | |
"LL" to "C", | |
"CCCCC" to "D", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'), | |
less = require('gulp-less'), | |
babel = require("gulp-babel"), | |
shell = require('gulp-shell'), | |
mocha = require('gulp-mocha'), | |
rename = require('gulp-rename'), | |
bro = require('gulp-bro'), | |
del = require('del'), | |
{ series, dest, src } = require('gulp'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Dave Schinkel's Notes after he wrote this test: | |
This is a test I wrote headlessly with Roboelectric around an existing Legacy codebase that's a mess. | |
We want to get some sort of confidence with an integration test which is what this test gave us for a | |
certain part of this codebase. | |
This test indirectly tests behavior further down by | |
checking what I ultimately expected to be rendered | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
#define NUMBER_OF_DAYS 3 | |
// Put your code below: | |
int main(void) | |
{ | |
int k, highEntry, lowEntry; | |
printf("-- -= == IPC Temperature Analyzer == = --\n"); | |
for (int i = 1; i < NUMBER_OF_DAYS; i++) |