Skip to content

Instantly share code, notes, and snippets.

View futureperfect's full-sized avatar

Erik Hollembeak futureperfect

View GitHub Profile
class RapperNameGenerator
def initialize
@first = ["Young", "Lil'", "Notorious", "MC"]
@last = ["Jeezy", "Chris", "Escher", "Wayne", "Dicky"]
srand
end
def generate
first_index = rand(@first.length)
  1. General Background and Overview
@futureperfect
futureperfect / README.md
Last active August 29, 2015 14:23
Ruby Implementation of Heap's algorithm for generating all permutations of a collection

Permutations

This is an implementation of Heap's algorithm for generating the permutations of a collection.

@futureperfect
futureperfect / README.md
Last active August 29, 2015 14:23
Ruby Refactoring Exercise

Traffic Light Refactoring Exercise

The code contained in traffic_light.rb is a simple model for a traffic light. How can we refactor this? Pretend we have tests so we're actually refactoring and not just changing shit.

Note anything about what you observe in this code and how it drives your refactoring.

@futureperfect
futureperfect / README.md
Created June 16, 2015 23:41
String Calculator Kata

String Calculator

This is my first implementation of this String Calculator Code Kata.

It was written as TDD with Guard driving Minitest.

@futureperfect
futureperfect / Swift Exercises.md
Last active May 25, 2019 21:50
Swift Exercises

Swift Exercises

This is a collection of familiarization exercises in Swift. They'll suffer from ignorance of writing idiomatic code. My goal is to iterate on these as fluency develops and leave them up for the brave.

In short:

  • Caveat Lector
  • Don't Be A Jerk
@futureperfect
futureperfect / README
Last active August 29, 2015 14:00
Answers for Gist located at practice programming problems gist
Problems can be found here:
https://gist.github.com/futureperfect/11016201
@futureperfect
futureperfect / README
Last active September 4, 2019 03:16
Collection of small, interesting programming exercises
Hey,
This is collection of small, interesting interview practice problems.
Hope you get some utility out of this.
Erik
@futureperfect
futureperfect / extensible_sort.c
Created February 3, 2014 22:55
C command line list sorting w/ sort function extensibility and comparator extensibility
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
void die(const char *message)
{
if(errno) {
perror(message);
} else {
;; Author: Erik Hollembeak
;;
(defun test-gamegrid-nonsense ()
"Test out using gamegrid for rendering 2D ASCII world"
(require 'cl)
(require 'gamegrid)
(loop for x from 33 to 57 do
(gamegrid-init-buffer 24 24 x)
(sit-for 0.4)))