This file contains 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
//Bad example | |
class Rectangle { | |
private int m_width; | |
private int m_height; | |
public void setWidth(int width){m_width = width;} | |
public void setHeight(int height){m_height = height;} | |
public int getWidth(){return m_width;} | |
public int getHeight(){return m_height;} | |
public int getArea(){return m_width * m_height;} | |
} |
This file contains 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
// Bad example | |
class GraphicEditor { | |
public void drawShape(Shape s) { | |
if (s.m_type==1) drawRectangle(s); | |
else if (s.m_type==2) drawCircle(s); | |
} | |
public void drawCircle(Circle r) {....} | |
public void drawRectangle(Rectangle r) {....} | |
} |
This file contains 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
// Bad example | |
interface IEmail { | |
public void setSender(String sender); | |
public void setReceiver(String receiver); | |
public void setContent(String content); | |
} | |
class Email implements IEmail { | |
public void setSender(String sender) {// set sender; } | |
public void setReceiver(String receiver) {// set receiver; } | |
public void setContent(String content) {// set content; } |
This file contains 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
#!/usr/bin/env bash | |
# Install command-line tools using Homebrew. | |
# Make sure we’re using the latest Homebrew. | |
brew update | |
# Upgrade any already-installed formulae. | |
brew upgrade --all |
This file contains 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 org.jacoco.examples; | |
import java.io.InputStream; | |
import java.io.PrintStream; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.jacoco.core.analysis.Analyzer; | |
import org.jacoco.core.analysis.CoverageBuilder; | |
import org.jacoco.core.analysis.IClassCoverage; |
This file contains 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
Period | test-first | test-addition | refactoring | regression | production | test-last | |
---|---|---|---|---|---|---|---|
Period 1 | 2 | 4 | 2 | 3 | 1 | 8 | |
Period 2 | 2 | 6 | 3 | 3 | 7 | 8 | |
Period 3 | 6 | 6 | 4 | 5 | 8 | 8 | |
Period 4 | 9 | 9 | 4 | 8 | 8 | 8 | |
Period 5 | 9 | 9 | 7 | 8 | 10 | 10 | |
Period 6 | 9 | 9 | 12 | 8 | 10 | 10 |
This file contains 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
seq | event | n | |
---|---|---|---|
1 | test-first | 5 | |
1 | test-last | 3 | |
1 | test-addition | 3 | |
1 | refactoring | 2 | |
1 | regression | 2 | |
2 | test-last | 7 | |
2 | test-first | 5 | |
3 | test-last | 7 | |
3 | test-first | 7 |
This file contains 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
# ~/.tmuxinator/rails-dev.yml | |
name: rails-dev | |
root: ~/Projects/galileo | |
# Optional tmux socket | |
# socket_name: foo | |
# Runs before everything. Use it to start daemons etc. | |
# pre: sudo /etc/rc.d/mysqld start |
This file contains 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
DEBUG=True | |
CSRF_COOKIE_SECURE=False | |
SESSION_COOKIE_SECURE=False | |
SECRET_KEY=s3cr3t | |
DATABASE_URL=sqlite:////tmp/db.sqlite3 | |
ALLOWED_HOSTS=* | |
EMAIL_BACKEND=django.core.mail.backends.filebased.EmailBackend | |
EMAIL_HOST=email_host | |
EMAIL_PORT=587 | |
EMAIL_HOST_USER=host_user |
This file contains 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
########################### | |
# Configuration | |
########################### | |
# use 256 term for pretty colors | |
set -g default-terminal "screen-256color" | |
# increase scroll-back history | |
set -g history-limit 5000 |