Skip to content

Instantly share code, notes, and snippets.

tab tab tab...

r4wm R4wm

tab tab tab...
View GitHub Profile

The Three Laws of TDD

Over the years I have come to describe Test Driven Development in terms of three simple rules. They are:

  1. You are not allowed to write any production code unless it is to make a failing unit test pass.
  2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
  3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.

You must begin by writing a unit test for the functionality that you intend to write. But by rule 2, you can't write very much of that unit test. As soon as the unit test code fails to compile, or fails an assertion, you must stop and write production code. But by rule 3 you can only write the production code that makes the test compile or pass, and no more.

R4wm /
Created Aug 25, 2021
Romans 6 personal outline

Chapter 6

  • we have a choice on who to serve
  • True baptism, into Jesus Christ, into His death
    • I am buried WITH Him by baptism into death
      • I shall also live with Him
      • This is NOTHING related to water baptism (washing away of sins)
  • The old man is crucified with Him
  • I am not under the law, I am under grace
    • Dead unto sin
  • This means that sin has no hold on me. It cant condemn me anymore. Sin is nullified even when I commit the act
R4wm /
Last active Aug 23, 2021
docker notes bc i forget

Get image

list found at: docker hub

docker pull ubuntu:xenial

create docker container from image id

the hash is the docker image ID
Note: the hash after -it is the image ID from docker container ls -a

R4wm / svn_notes.txt
Last active Jun 25, 2021
svn why,...
View svn_notes.txt
# Turn on exe on file
svn propset svn:executable on
# Turn off exe on file
svn propdel -R svn:executable
R4wm /
Last active May 4, 2021
super simple script to get daily reading ranges
#!/usr/bin/env python3
import requests
URL = ''
# get_portion #
def get_portion(a_testament: str) -> str:
a_testament = a_testament.lower()
# Form the string
R4wm / emacs_notes.txt
Last active Apr 16, 2021
useful commands in emacs for c++
View emacs_notes.txt
global-semantic-idle-summary-mode # this one shows me where the definition is!
semantic-stickyfunc-mode # Keeps function name at the top
R4wm /
Created Apr 9, 2021
get all mp3
for i in $(curl '' | egrep -o 'data-path=".*"' | tr " " "\n" | egrep "*.mp3" | cut -f2 -d'=' | tr -d '"'); do wget --tries=3 "$i" ; done
R4wm / golang-request
Last active Dec 12, 2020 — forked from kendellfab/golang-request
Golang Example for adding custom headers to a request.
View golang-request
package main
import (
func main() {
R4wm /
Last active Dec 10, 2020
int an hex, hex to int
import re
import sys
import argparse
def getHex(a_user_int):
return hex(a_user_int).split('x')[-1].upper()
def getInt(a_hex):
R4wm / bible.service
Created Nov 30, 2020
systemd service file for bible_api (local)
View bible.service
ExecStart=/home/rmintz/bin/bible_api -dbPath /home/rmintz/kjv.db