Instantly better presentations - Damian Conway
It probably just makes more sense to just view his version online at:
http://damian.conway.org/IBP.pdf
But making notes is useful anyway.
# From Bryan Liles on the Practicing Ruby Discussion List | |
1. TDD is a great tool. As a tool, you'll use it when appropriate. | |
TATFT mostly means that you should be thinking about how you can put | |
whatever you are creating under test at all times. Writing tests for | |
the sake of writing tests is silly. | |
2. Like Gregory stated, brittle tests aren't helping anyone. Think | |
about the ingress/egress points of your objects at all times. |
#!/bin/bash | |
# Author: slowpoke <proxypoke at lavabit dot com> | |
# | |
# Copying and distribution of this file, with or without modification, | |
# are permitted in any medium without royalty provided the copyright | |
# notice and this notice are preserved. This file is offered as-is, | |
# without any warranty. | |
# | |
# A pre-commit hook for go projects. In addition to the standard |
Instantly better presentations - Damian Conway
It probably just makes more sense to just view his version online at:
http://damian.conway.org/IBP.pdf
But making notes is useful anyway.
# Make the blue color for directories more readable | |
set -x LSCOLORS Exfxcxdxbxegedabagacad | |
# this is needed to avoid strange python stack backtrace complaining about UTF-8 when | |
# running sphinx. Found it by googling | |
set -x LC_ALL en_US.UTF-8 | |
set -x LANG en_US.UTF-8 | |
set -x JULIA_EDITOR textmate | |
# so our brew install override the commands from the system |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
# Original Rails controller and action | |
class EmployeesController < ApplicationController | |
def create | |
@employee = Employee.new(employee_params) | |
if @employee.save | |
redirect_to @employee, notice: "Employee #{@employee.name} created" | |
else | |
render :new | |
end |
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"strings" | |
"time" | |
) | |
// https://httpd.apache.org/docs/2.2/logs.html#combined + execution time. | |
const apacheFormatPattern = "%s - - [%s] \"%s %s %s\" %d %d \"%s\" \"%s\" %.4f\n" |