Skip to content

Instantly share code, notes, and snippets.

View tkshill's full-sized avatar
♥️
Trying

Kirk Shillingford tkshill

♥️
Trying
View GitHub Profile
@tkshill
tkshill / fuzz_testing.elm
Created October 4, 2020 22:56
an example of fuzz testing custom union types in Elm
module Tests exposing (suite)
import Expect
import Fuzz exposing (Fuzzer)
import Pages.Quarto as Q exposing (Colour(..), Gamepiece, Pattern(..), Shape(..), Size(..))
import Test exposing (Test, describe, fuzz)
-- TESTS ON CALCULATING GAME WIN LOGIC
@tkshill
tkshill / Tests.elm
Last active November 8, 2020 19:52
An Elm implementation of the exercism.io challenge "Word Count" using Elm-Parser
module Tests exposing (tests)
import Dict
import Expect
import Test exposing (..)
import WordCount exposing (wordCount)
tests : Test
tests =
@tkshill
tkshill / DelayedGenerator.elm
Last active November 9, 2020 19:29
Mimicking Choice with Delayed Generators
module Main exposing (main)
-- Press a button to draw a random card.
--
-- Dependencies:
-- elm install elm/random
--
import Browser
import Html exposing (..)
@tkshill
tkshill / blog.md
Last active January 16, 2024 12:35
A Starter Guide To Open Source Maintenance

Introduction

This document serves as a way for this project's maintainers to document their process of getting their repository ready for the 2020 Hacktoberfest alongside the Virtual Coffee Hacktoberfest Initiative. We also hope this project continues beyond just Hacktoberfest, and so we thought it best to collect all the knowledge, resources and learnings we pick up along the way in one central place, both for our own reflection, as well as sometimes that others can use to create welcoming and valuable spaces for their own open source contributions.

While we will try as best as possible to create a body of knowledge that is accessible and understandable to everyone who finds it, we hope you understand that this may not always be as comprehensive, current or exact as you may want to be. The language will be more candid that you might find in your typical technical documentation, and YMMV _(Your

@tkshill
tkshill / blog.md
Last active November 17, 2020 21:25
The Lone(ly) Coder
At my job I code alone.
I have always coded alone.
Until now.
Now I code with friends.
Now I code with family.
I will never code alone again.
- An Ode to Open Source
@tkshill
tkshill / blog.md
Last active November 10, 2020 22:21
Advent Of Code 2020 - 25 Language Challenge

The Progenitors

  1. Lisp
  2. C
  3. Smalltalk
  4. Cobol
  5. Ada

The Bash bros

@tkshill
tkshill / Talks_I_Love.md
Last active April 28, 2023 16:50
7 tech talks I love (and Why)

When I just started learning to code I was very obsessed and spent far too much time watching software development videos. I was determined to become the Best Python Developer In The World (don't do this) and I would spend the wee hours of the morning watching programming video after programming video searching for more grains of insight (don't do this either). I wanted to learn the Best Way to write code; the most powerful, idiomatic, robust, resilient, elegant solutions.

That was, in retrospect, not a bad ideal. But the way I went about it may have been a bit silly.

Real working software design is about tradeoffs, and providing solutions, even when those solutions are not as elegant as we would like. And no amount of videos can replace trying your hand at solving a problem. Fortunately I learned this before it was too late.

But I wouldn't call my time spent watching my contemporaries fruitless. Good developers learn from other developers. Whether through videos, articles, courses, pair pr

@tkshill
tkshill / _medianarrow.scss
Created December 10, 2020 15:59
this file is fine... until i try to wrap the stuff in a media query
/* MEDIA: only screen and (max-width: 42em), handheld ENDMEDIA */
@media only screen and (max-width: 42em) {
#outer {
background: #fff;
font-size: 0.875em;
position: relative;
}
h1, h2, h3 {
word-break: break-all;
@tkshill
tkshill / Minesweeper.hs
Created April 19, 2021 00:48
Solving the exercism Minesweeper problem with Haskell
module Minesweeper (annotate) where
import Data.Char (intToDigit)
import Data.List.Split (chunksOf)
annotate :: [String] -> [String]
annotate [] = []
annotate [[]] = [[]]
annotate board =
toBoard $ zipWith toOutput flatboard $ bombCounts board
@tkshill
tkshill / Readme.md
Last active April 26, 2023 01:11
Solving the Exercism Diamond problem using Haskell

Diamond

The diamond kata takes as its input a letter, and outputs it in a diamond shape. Given a letter, it prints a diamond starting with 'A', with the supplied letter at the widest point.

Requirements

  • The first row contains one 'A'.
  • The last row contains one 'A'.