- 0.1. No duplicated code
- 0.2. Single Responsability Principle
- 0.3. Open-Closed Principle
- 0.4. Low coupling
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
#lang racket | |
(require racket/gui) | |
; | |
; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
; I wrote this code five years ago while learning functional programming. | |
; It is an example of what you should NOT do in a functional language (or in software writing in general). | |
; | |
; THIS IS NOT A GOOD EXAMPLE OF RACKET CODE. | |
; |
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
# -*- encoding: utf-8 -*- | |
import math | |
import sys | |
try: | |
import pytest | |
except ImportError: | |
if len(sys.argv) < 1 or sys.argv[1] != '-f': | |
print 'pip2.7 install --user pytest' | |
print 'Ou eu vou ficar sem meus testes :^(' |
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
#lang racket | |
(require test-engine/racket-tests) | |
; Armazena uma tupla (caracter, contagem) que representa | |
; uma sequência. | |
; | |
; ch : elemento, normalmente string de tamanho 1 | |
; count : inteiro | |
(struct chtuple (ch count)) |
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
defmodule CustomIEx.Utils do | |
@doc """ | |
Puts some term into the clipboard | |
""" | |
def copy(data) do | |
# Copy to clipboard program depends on the OS | |
cmd = "pbcopy" ## --> mac | |
# cmd = "xclip -selection clipboard" ## --> linux | |
# cmd = "clip" ## --> windows | |
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
FROM debian:bullseye | |
RUN apt-get update && \ | |
apt-get -y install texlive-extra-utils | |
WORKDIR /data |